﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameBase.Form.Control
{
    public class MyButton : MyControl
    {
        public MyButton(String strFilePath, Vector2 position, string text)
        {
            initButton(strFilePath, position, text, Color.White);
        }
        public MyButton(Vector2 position, string text)
        {
            initButton(@"System/Button", position, text, Color.White);
        }
        public MyButton(string text,Color color)
        {
            initButton(@"System/Button", Vector2.Zero, text, color);
        }
        public MyButton(String strFilePath,Vector2 position)
        {
            initButton(strFilePath, position, "",Color.White);
        }
        private void initButton(String strFilePath, Vector2 position, string text,Color color)
        {
            Sprite = new GameBase.Sprite(strFilePath, 3, 1);
            Position = position;
            Color = color;
            Text = text;
           // font = GameBase.Constant.content.Load<SpriteFont>(@"Resources/fontNormal");
            
        }

        public MyButton(String strFilePath, Vector2 position, int row, int col, int frame1, int frame2, int frame3)
        {
            Position = position;
            Sprite = new GameBase.Sprite(strFilePath, row, col);
            defaultFrame = frame1;
            hoverFrame = frame2;
            pressedFrame = frame3;
            text = "";
        }
    }
}
